home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacOS 8 Resources / Developer Tools / Mac OS 8 Interfaces & Libraries / Interfaces / PInterfaces / ENET.p < prev    next >
Text File  |  1996-05-01  |  4KB  |  122 lines

  1. {
  2.      File:        ENET.p
  3.  
  4.      Contains:    Ethernet Interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Release:    Universal Interfaces 3.0d3 on Copland DR1
  8.  
  9.      Copyright:    © 1984-1996 by Apple Computer, Inc.  All rights reserved.
  10.  
  11.      Bugs?:        If you find a problem with this file, send the file and version
  12.                  information (from above) and the problem description to:
  13.  
  14.                      Internet:    apple.bugs@applelink.apple.com
  15.                      AppleLink:    APPLE.BUGS
  16.  
  17. }
  18. {$IFC UNDEFINED UsingIncludes}
  19. {$SETC UsingIncludes := 0}
  20. {$ENDC}
  21.  
  22. {$IFC NOT UsingIncludes}
  23.  UNIT ENET;
  24.  INTERFACE
  25. {$ENDC}
  26.  
  27. {$IFC UNDEFINED __ENET__}
  28. {$SETC __ENET__ := 1}
  29.  
  30. {$I+}
  31. {$SETC ENETIncludes := UsingIncludes}
  32. {$SETC UsingIncludes := 1}
  33.  
  34. {$IFC UNDEFINED __TYPES__}
  35. {$I Types.p}
  36. {$ENDC}
  37. {$IFC UNDEFINED __OSUTILS__}
  38. {$I OSUtils.p}
  39. {$ENDC}
  40.  
  41. {$PUSH}
  42. {$ALIGN MAC68K}
  43. {$LibExport+}
  44.  
  45. {$IFC FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED }
  46.  
  47. CONST
  48.     ENetSetGeneral                = 253;                            { Set "general" mode }
  49.     ENetGetInfo                    = 252;                            { Get info }
  50.     ENetRdCancel                = 251;                            { Cancel read }
  51.     ENetRead                    = 250;                            { Read }
  52.     ENetWrite                    = 249;                            { Write }
  53.     ENetDetachPH                = 248;                            { Detach protocol handler }
  54.     ENetAttachPH                = 247;                            { Attach protocol handler }
  55.     ENetAddMulti                = 246;                            { Add a multicast address }
  56.     ENetDelMulti                = 245;                            { Delete a multicast address }
  57.     EAddrRType                    = 'eadr';                        { Alternate address resource type }
  58.  
  59.  
  60. TYPE
  61.     EParamBlockPtr = ^EParamBlock;
  62.     EParamBlkPtr                        = ^EParamBlock;
  63.     ENETCompletionProcPtr = Register68kProcPtr;  { PROCEDURE ENETCompletion(thePBPtr: EParamBlkPtr); }
  64.  
  65.     ENETCompletionUPP = UniversalProcPtr;
  66.     EParamBlock = PACKED RECORD
  67.         qLink:                    QElemPtr;                                { General EParams }
  68.         qType:                    INTEGER;                                { queue type }
  69.         ioTrap:                    INTEGER;                                { routine trap }
  70.         ioCmdAddr:                Ptr;                                    { routine address }
  71.         ioCompletion:            ENETCompletionUPP;                        { completion routine }
  72.         ioResult:                OSErr;                                    { result code }
  73.         ioNamePtr:                StringPtr;                                { ->filename }
  74.         ioVRefNum:                INTEGER;                                { volume reference or drive number }
  75.         ioRefNum:                INTEGER;                                { driver reference number }
  76.         csCode:                    INTEGER;                                { Call command code }
  77.         CASE INTEGER OF
  78.         0: (
  79.             eProtType:            INTEGER;                                { Ethernet protocol type }
  80.             ePointer:            Ptr;                                    { No support for PowerPC code }
  81.             eBuffSize:            INTEGER;                                { buffer size }
  82.             eDataSize:            INTEGER;                                { number of bytes read }
  83.            );
  84.         1: (
  85.             eMultiAddr:            PACKED ARRAY [0..5] OF Byte;            { Multicast Address }
  86.            );
  87.     END;
  88.  
  89.  
  90. CONST
  91.     uppENETCompletionProcInfo = $00009802;
  92.  
  93. PROCEDURE CallENETCompletionProc(thePBPtr: EParamBlkPtr; userRoutine: ENETCompletionUPP);
  94.     {$IFC NOT GENERATINGCFM}
  95.     {To be implemented:  Glue to move parameters into registers.}
  96.     {$ENDC}
  97.  
  98. FUNCTION NewENETCompletionProc(userRoutine: ENETCompletionProcPtr): ENETCompletionUPP;
  99.     {$IFC NOT GENERATINGCFM }
  100.     INLINE $2E9F;
  101.     {$ENDC}
  102. FUNCTION EWrite(thePBptr: EParamBlkPtr; async: BOOLEAN): OSErr;
  103. FUNCTION EAttachPH(thePBptr: EParamBlkPtr; async: BOOLEAN): OSErr;
  104. FUNCTION EDetachPH(thePBptr: EParamBlkPtr; async: BOOLEAN): OSErr;
  105. FUNCTION ERead(thePBptr: EParamBlkPtr; async: BOOLEAN): OSErr;
  106. FUNCTION ERdCancel(thePBptr: EParamBlkPtr; async: BOOLEAN): OSErr;
  107. FUNCTION EGetInfo(thePBptr: EParamBlkPtr; async: BOOLEAN): OSErr;
  108. FUNCTION ESetGeneral(thePBptr: EParamBlkPtr; async: BOOLEAN): OSErr;
  109. FUNCTION EAddMulti(thePBptr: EParamBlkPtr; async: BOOLEAN): OSErr;
  110. FUNCTION EDelMulti(thePBptr: EParamBlkPtr; async: BOOLEAN): OSErr;
  111. {$ENDC}
  112. {$ALIGN RESET}
  113. {$POP}
  114.  
  115. {$SETC UsingIncludes := ENETIncludes}
  116.  
  117. {$ENDC} {__ENET__}
  118.  
  119. {$IFC NOT UsingIncludes}
  120.  END.
  121. {$ENDC}
  122.